<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<style type="text/css">
	img{
		width:100px;
	}
</style>
<script type="text/javascript">
var imgs=["1.jpg","2.jpg","6.jpg"];	
		var x=0
	 setInterval(function myfn(){
		var i = x++%imgs.length;
		//console.log(i);
		var name = imgs[i];
		d1.innerHTML += "<img src ='../imgs/"+name+"'>";
	 },1000);
</script>
</head>
<body>
<div id="d1"></div>
</body>
</html>